Optimal. Leaf size=89 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {3-2 i} \sqrt {\tan (c+d x)}}{\sqrt {-2+3 \tan (c+d x)}}\right )}{\sqrt {3-2 i} d}+\frac {\tanh ^{-1}\left (\frac {\sqrt {3+2 i} \sqrt {\tan (c+d x)}}{\sqrt {-2+3 \tan (c+d x)}}\right )}{\sqrt {3+2 i} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3656, 926, 95,
214} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {3-2 i} \sqrt {\tan (c+d x)}}{\sqrt {3 \tan (c+d x)-2}}\right )}{\sqrt {3-2 i} d}+\frac {\tanh ^{-1}\left (\frac {\sqrt {3+2 i} \sqrt {\tan (c+d x)}}{\sqrt {3 \tan (c+d x)-2}}\right )}{\sqrt {3+2 i} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 95
Rule 214
Rule 926
Rule 3656
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {-2+3 \tan (c+d x)}} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {-2+3 x} \left (1+x^2\right )} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {i}{2 (i-x) \sqrt {x} \sqrt {-2+3 x}}+\frac {i}{2 \sqrt {x} (i+x) \sqrt {-2+3 x}}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {i \text {Subst}\left (\int \frac {1}{(i-x) \sqrt {x} \sqrt {-2+3 x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {i \text {Subst}\left (\int \frac {1}{\sqrt {x} (i+x) \sqrt {-2+3 x}} \, dx,x,\tan (c+d x)\right )}{2 d}\\ &=\frac {i \text {Subst}\left (\int \frac {1}{i-(2+3 i) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {-2+3 \tan (c+d x)}}\right )}{d}+\frac {i \text {Subst}\left (\int \frac {1}{i+(2-3 i) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {-2+3 \tan (c+d x)}}\right )}{d}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {3-2 i} \sqrt {\tan (c+d x)}}{\sqrt {-2+3 \tan (c+d x)}}\right )}{\sqrt {3-2 i} d}+\frac {\tanh ^{-1}\left (\frac {\sqrt {3+2 i} \sqrt {\tan (c+d x)}}{\sqrt {-2+3 \tan (c+d x)}}\right )}{\sqrt {3+2 i} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 89, normalized size = 1.00 \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {-3+2 i} \sqrt {\tan (c+d x)}}{\sqrt {-2+3 \tan (c+d x)}}\right )}{\sqrt {-3+2 i} d}+\frac {\tanh ^{-1}\left (\frac {\sqrt {3+2 i} \sqrt {\tan (c+d x)}}{\sqrt {-2+3 \tan (c+d x)}}\right )}{\sqrt {3+2 i} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(479\) vs.
\(2(73)=146\).
time = 1.87, size = 480, normalized size = 5.39
method | result | size |
derivativedivides | \(-\frac {\sqrt {\frac {\tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}\, \left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right ) \left (3 \sqrt {2 \sqrt {13}-6}\, \sqrt {13}\, \sqrt {2 \sqrt {13}+6}\, \arctan \left (\frac {\sqrt {2 \sqrt {13}-6}\, \sqrt {\frac {\left (11 \sqrt {13}-39\right ) \tan \left (d x +c \right ) \left (39+11 \sqrt {13}\right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}\, \left (3 \sqrt {13}+11\right ) \left (\sqrt {13}+3+2 \tan \left (d x +c \right )\right ) \left (11 \sqrt {13}-39\right ) \left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )}{416 \tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}\right )-11 \sqrt {2 \sqrt {13}-6}\, \sqrt {2 \sqrt {13}+6}\, \arctan \left (\frac {\sqrt {2 \sqrt {13}-6}\, \sqrt {\frac {\left (11 \sqrt {13}-39\right ) \tan \left (d x +c \right ) \left (39+11 \sqrt {13}\right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}\, \left (3 \sqrt {13}+11\right ) \left (\sqrt {13}+3+2 \tan \left (d x +c \right )\right ) \left (11 \sqrt {13}-39\right ) \left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )}{416 \tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}\right )+4 \arctanh \left (\frac {4 \sqrt {13}\, \sqrt {\frac {\tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+78}}\right ) \sqrt {13}-12 \arctanh \left (\frac {4 \sqrt {13}\, \sqrt {\frac {\tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+78}}\right )\right )}{2 d \sqrt {\tan \left (d x +c \right )}\, \sqrt {-2+3 \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {13}+6}\, \left (11 \sqrt {13}-39\right )}\) | \(480\) |
default | \(-\frac {\sqrt {\frac {\tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}\, \left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right ) \left (3 \sqrt {2 \sqrt {13}-6}\, \sqrt {13}\, \sqrt {2 \sqrt {13}+6}\, \arctan \left (\frac {\sqrt {2 \sqrt {13}-6}\, \sqrt {\frac {\left (11 \sqrt {13}-39\right ) \tan \left (d x +c \right ) \left (39+11 \sqrt {13}\right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}\, \left (3 \sqrt {13}+11\right ) \left (\sqrt {13}+3+2 \tan \left (d x +c \right )\right ) \left (11 \sqrt {13}-39\right ) \left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )}{416 \tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}\right )-11 \sqrt {2 \sqrt {13}-6}\, \sqrt {2 \sqrt {13}+6}\, \arctan \left (\frac {\sqrt {2 \sqrt {13}-6}\, \sqrt {\frac {\left (11 \sqrt {13}-39\right ) \tan \left (d x +c \right ) \left (39+11 \sqrt {13}\right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}\, \left (3 \sqrt {13}+11\right ) \left (\sqrt {13}+3+2 \tan \left (d x +c \right )\right ) \left (11 \sqrt {13}-39\right ) \left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )}{416 \tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}\right )+4 \arctanh \left (\frac {4 \sqrt {13}\, \sqrt {\frac {\tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+78}}\right ) \sqrt {13}-12 \arctanh \left (\frac {4 \sqrt {13}\, \sqrt {\frac {\tan \left (d x +c \right ) \left (-2+3 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-3-2 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+78}}\right )\right )}{2 d \sqrt {\tan \left (d x +c \right )}\, \sqrt {-2+3 \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {13}+6}\, \left (11 \sqrt {13}-39\right )}\) | \(480\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {3 \tan {\left (c + d x \right )} - 2} \sqrt {\tan {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 489 vs. \(2 (65) = 130\).
time = 0.52, size = 489, normalized size = 5.49 \begin {gather*} -\frac {\sqrt {3} {\left (-\left (3 i + 2\right ) \, \sqrt {6 \, \sqrt {13} - 18} {\left (-\frac {2 i}{\sqrt {13} - 3} + 1\right )} \log \left (\left (120 i + 40\right ) \, \sqrt {13} {\left (\sqrt {3} \sqrt {\tan \left (d x + c\right )} - \sqrt {3 \, \tan \left (d x + c\right ) - 2}\right )}^{2} + \left (432 i + 144\right ) \, {\left (\sqrt {3} \sqrt {\tan \left (d x + c\right )} - \sqrt {3 \, \tan \left (d x + c\right ) - 2}\right )}^{2} + 80 \, \sqrt {13} \sqrt {15 \, \sqrt {13} + 54} + 800 \, \sqrt {13} - \left (16 i - 288\right ) \, \sqrt {15 \, \sqrt {13} + 54} + 2880\right ) + \left (3 i + 2\right ) \, \sqrt {6 \, \sqrt {13} - 18} {\left (-\frac {2 i}{\sqrt {13} - 3} + 1\right )} \log \left (\left (120 i + 40\right ) \, \sqrt {13} {\left (\sqrt {3} \sqrt {\tan \left (d x + c\right )} - \sqrt {3 \, \tan \left (d x + c\right ) - 2}\right )}^{2} + \left (432 i + 144\right ) \, {\left (\sqrt {3} \sqrt {\tan \left (d x + c\right )} - \sqrt {3 \, \tan \left (d x + c\right ) - 2}\right )}^{2} - 80 \, \sqrt {13} \sqrt {15 \, \sqrt {13} + 54} + 800 \, \sqrt {13} + \left (16 i - 288\right ) \, \sqrt {15 \, \sqrt {13} + 54} + 2880\right ) - \left (2 i + 3\right ) \, \sqrt {6 \, \sqrt {13} + 18} {\left (-\frac {2 i}{\sqrt {13} + 3} + 1\right )} \log \left (8 \, \sqrt {13} {\left (\sqrt {3} \sqrt {\tan \left (d x + c\right )} - \sqrt {3 \, \tan \left (d x + c\right ) - 2}\right )}^{2} - 24 \, {\left (\sqrt {3} \sqrt {\tan \left (d x + c\right )} - \sqrt {3 \, \tan \left (d x + c\right ) - 2}\right )}^{2} + 8 \, \sqrt {13} \sqrt {6 \, \sqrt {13} - 18} + \left (48 i + 16\right ) \, \sqrt {13} + \left (16 i - 24\right ) \, \sqrt {6 \, \sqrt {13} - 18} - 144 i - 48\right ) + \left (2 i + 3\right ) \, \sqrt {6 \, \sqrt {13} + 18} {\left (-\frac {2 i}{\sqrt {13} + 3} + 1\right )} \log \left (8 \, \sqrt {13} {\left (\sqrt {3} \sqrt {\tan \left (d x + c\right )} - \sqrt {3 \, \tan \left (d x + c\right ) - 2}\right )}^{2} - 24 \, {\left (\sqrt {3} \sqrt {\tan \left (d x + c\right )} - \sqrt {3 \, \tan \left (d x + c\right ) - 2}\right )}^{2} - 8 \, \sqrt {13} \sqrt {6 \, \sqrt {13} - 18} + \left (48 i + 16\right ) \, \sqrt {13} - \left (16 i - 24\right ) \, \sqrt {6 \, \sqrt {13} - 18} - 144 i - 48\right )\right )}}{156 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.21, size = 89, normalized size = 1.00 \begin {gather*} 2\,\mathrm {atanh}\left (\frac {2\,d\,\sqrt {\frac {\frac {3}{52}-\frac {1}{26}{}\mathrm {i}}{d^2}}\,\sqrt {3\,\mathrm {tan}\left (c+d\,x\right )-2}}{\sqrt {\mathrm {tan}\left (c+d\,x\right )}}\right )\,\sqrt {\frac {\frac {3}{52}-\frac {1}{26}{}\mathrm {i}}{d^2}}+2\,\mathrm {atanh}\left (\frac {2\,d\,\sqrt {\frac {\frac {3}{52}+\frac {1}{26}{}\mathrm {i}}{d^2}}\,\sqrt {3\,\mathrm {tan}\left (c+d\,x\right )-2}}{\sqrt {\mathrm {tan}\left (c+d\,x\right )}}\right )\,\sqrt {\frac {\frac {3}{52}+\frac {1}{26}{}\mathrm {i}}{d^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________